package pw.canyingisme.plugin.occupation;

import org.bukkit.command.CommandSender;
import pw.canyingisme.plugin.config.ConfigLoader;

public class OccupationLanguage {
    public static void sendHelp(CommandSender sender){
        sender.sendMessage("#ShadowOccupation命令");
        sender.sendMessage("#/occupation choice [Occupation] -选择一个职业");
        sender.sendMessage("#/occupation choice list -输出职业列表");
        sender.sendMessage("#/occupation me -查看自己的职业");
        sender.sendMessage("#ShadowOccupation");
    }
    public static void sendAdminHelp(CommandSender sender){
        sender.sendMessage("#ShadowOccupation Admin命令");
        sender.sendMessage("#/occupation-admin remove [Player] -清除某个玩家的职业");
        sender.sendMessage("#/occupation-admin reset [Player] [Occupation] -重置某个玩家的职业");
        sender.sendMessage("#/occupation-admin occupation [Player] -查看某个玩家的职业");
        sender.sendMessage("#ShadowOccupation");
    }
    public static void sendJobList(CommandSender sender){
        sender.sendMessage("#ShadowOccupation职业");
        for (String s : ConfigLoader.getOccupationSet()) {
            sender.sendMessage(s+" -"+ConfigLoader.occupationGetName(s));
        }
        sender.sendMessage("#ShadowOccupation");
    }
    public static void sendSelfOccupation(CommandSender sender){
        if(ConfigLoader.hasOccupation(sender.getName())){
            sender.sendMessage("你的职业是"+ConfigLoader.occupationGetName(ConfigLoader.getPlayerOccupation(sender.getName())));
            return;
        }
        sender.sendMessage("你没有职业");
    }
    public static void sendPlayerOccupation(CommandSender sender,String playerName){
        if(ConfigLoader.hasOccupation(playerName)){
            sender.sendMessage("玩家"+playerName+"的职业是"+ConfigLoader.occupationGetName(ConfigLoader.getPlayerOccupation(playerName)));
            return;
        }
        sender.sendMessage("玩家"+playerName+"没有职业");
    }
}
